//
//  SchoolDetailController.m
//  CaiPiao
//
//  Created by l wb on 2018/5/18.
//  Copyright © 2018年 apple. All rights reserved.
//

#import "SchoolDetailController.h"
#import "SchoolDataTool.h"
#import "SchoolCell.h"
@interface SchoolDetailController ()<UITableViewDelegate,UITableViewDataSource>

@property (nonatomic,strong) NSArray *dataArr;
@property (weak, nonatomic) IBOutlet UITableView *tableView;
@end

@implementation SchoolDetailController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navigationItem.title = @"彩种学堂";
  self.dataArr = [SchoolDataTool getSchoolDetailDataWithNumber:self.number];
    self.tableView.estimatedRowHeight = 400;

    
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    return UITableViewAutomaticDimension;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    SchoolCell *cell = [tableView dequeueReusableCellWithIdentifier:@"SchoolCell"];

    cell.introduceLab.text = self.dataArr[0];
    cell.playsLab.text = self.dataArr[1];

    return cell;
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 1;
}
@end
